Skip to content

Fix comment for OTEL env var reading condition#200

Merged
purple4reina merged 1 commit into
DataDog:mainfrom
sudame:main
May 19, 2025
Merged

Fix comment for OTEL env var reading condition#200
purple4reina merged 1 commit into
DataDog:mainfrom
sudame:main

Conversation

@sudame
Copy link
Copy Markdown
Contributor

@sudame sudame commented May 16, 2025

What does this PR do?

Fix comment for OTEL env var reading condition.

Motivation

While reading the code to check the configuration values of datadog-lambda-go, I noticed that the comment and the implementation are incorrect.

Testing Guidelines

Code reading (because this PR only changes the comment).

When reading the HandlerStarted function, I noticed that if l.ddTraceEnabled is false, the function returns early, while if it is true, the process continues and further actions are taken depending on the condition of l.otelTracerEnabled. In other words, when Datadog Trace is enabled, OpenTelemetry Trace is also enabled. This shows that the comment is incorrect and the implementation is correct.

Additional Notes

The comment was inserted by:

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Checklist

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog

@sudame sudame requested a review from a team as a code owner May 16, 2025 11:30
@purple4reina purple4reina merged commit a5836ec into DataDog:main May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants